{% extends 'layout/basic.html' %}
{% load static %}
{% block title %}订单{% endblock %}

{% block css %}
    <style>
    .slogan{
        font-size: 36px;
        text-align: center;
        margin: 50px 0;
    }
    </style>
{% endblock %}

{% block content %}
    <div class="container">
    <h2>订单信息(30分钟失效)</h2>
    <table class="table">
        <thead>
        <tr>
            <th>订单</th>
            <th>单价</th>
            <th>数量</th>
            <th>原价</th>
            <th>原订单抵扣</th>
            <th>实际支付</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>{{ policy_object.title }}</td>
            <td>{{ policy_object.price }}</td>
            <td>{{ number }}</td>
            <td>{{ origin_price }}</td>
            <td>{{ balance }}</td>
            <td>{{ total_price }}</td>
        </tr>
        </tbody>
    </table>
    {% if transcation %}
        <div class="alert alert-warning">
        <div>原订单抵扣：¥{{ balance }}</div>
        <div>
            原订单的时间为 {{ request.tracer.start_datetime }}
            ~ {{ request.tracer.end_datetime }}，且实际支付¥{{ request.tracer.price }}
        </div>
        </div>
    {% endif %}
        <a href="{% url 'web:pay' %}" class="btn btn-primary">立即支付</a>
    </div>
{% endblock %}